<template>
  <div>
      <post-item   :item="item" v-for="(item,index) in items" :key="index"></post-item>
  </div>
</template>

<script>
import post from "@/api/post";
import PostItem from "@/components/PostItem";

export default {
  name: "PostList",
  props:["items"],
  components: {PostItem},
  data() {
    return {
      // items: []
    }
  },
  created() {
    this.getData()
  },
  methods: {
    // getData() {
    //   post.getPosts(0, 10, 100).then(res => {
    //     this.items = res.data
    //     console.log(res.data)
    //   });
    // }
  }

}
</script>

<style lang="scss" scoped>

</style>
